package com.sharp.mq.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.ImmediateAcknowledgeAmqpException;
import org.springframework.amqp.rabbit.listener.ConditionalRejectingErrorHandler;

/**
 * Title: MyConditionalRejectingErrorHandler
 * Description: Copyright: Copyright (c) 2019 Company: BHFAE
 *
 * @author Sharp
 * @date 2021/7/4 20:46
 */
@Slf4j
public class MyConditionalRejectingErrorHandler extends ConditionalRejectingErrorHandler {

    @Override
    public void handleError(Throwable t) {
        try {
            super.handleError(t);
        } catch (ImmediateAcknowledgeAmqpException e) {
            log.error("", e);
        }
    }
}
